import request from '/@/utils/request.ts';

export function getSysUserList(params: object) {
	return request({
		url: 'core/sysUser/page',
		method: 'get',
		params,
	});
}

export function addSysUser(data: object) {
	return request({
		url: 'core/sysUser/',
		method: 'POST',
		data: data,
	});
}

export function getSysUserInfo(userId: any) {
	return request({
		url: `core/sysUser/${userId}`,
		method: 'GET',
	});
}

export function editSysUser(data: object, userId: any) {
	return request({
		url: `core/sysUser/${userId}`,
		method: 'PUT',
		data: data,
	});
}

export function delSysUser(userId: any) {
	return request({
		url: `core/sysUser/${userId}`,
		method: 'DELETE',
	});
}
